package com.monitor.search;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.monitor.pubInter.BaseSearch;
import com.monitor.model.User;

import java.util.Date;
import java.util.List;
import java.math.BigDecimal;

import lombok.Data;

/**
 * @author sunke
 * @Date 2025-03-21 13:51:28
 * @description UserSearch      用户信息
 */


@Data
@ApiModel("用户信息UserSearch")
public abstract class UserSearch<Sub extends UserSearch<Sub>> extends BaseSearch {
    @ApiModelProperty(value = "主键")
    private List idIn;
    @ApiModelProperty(value = "大于排序")
    private Integer sortNumGreater;
    @ApiModelProperty(value = "小于排序")
    private Integer sortNumLess;
    @ApiModelProperty(value = "是否显示 1:是:Y,0:否:N")
    private List showFlagIn;
    @ApiModelProperty(value = "是否删除 1:删除:Y,0:正常:N")
    private Integer delFlagEq = 0;
    @ApiModelProperty(value = "用户姓名")
    private String nameLike;
    @ApiModelProperty(value = "用户手机号")
    private String phoneLike;
    @ApiModelProperty(value = "云客用户id")
    private String ykUserIdLike;
    @ApiModelProperty(value = "是否离职1:在职,2离职")
    private List isValidIn;
    @ApiModelProperty(value = "所在部门")
    private String deptIdLike;
    @ApiModelProperty(value = "绑定的imei号）")
    private String imeiLike;
    @ApiModelProperty(value = "云客部门id")
    private String ykDeptIdLike;
    @ApiModelProperty(value = "云客系统的用户id")
    private String ykIdLike;
    @ApiModelProperty(value = "是否绑定云客的userId 1:绑定 0:未绑定")
    private List isBindIn;

    public UserSearch() {
        setDelFlagEq(0);
    }


    /**
     * 返回子类Sub
     *
     * @return
     */
    public abstract Sub getSubThis();

    @Override
    public String createTimeFiled() {
        return User.CREATE_TIME;
    }

    @Override
    public String updateTimeFiled() {
        return User.UPDATE_TIME;
    }

    @Override
    public String setDefaultField() {
        return User.CREATE_TIME;
    }

    @Override
    public String pkField() {
        return User.ID;
    }

    @Override
    public String toString() {
        return "UserSearch{}" + super.toString();
    }

    public Sub setIdIn(List idIn) {
        this.idIn = idIn;
        setInField(User.ID, idIn);
        return getSubThis();
    }

    public Sub setSortNumGreater(Integer sortNumGreater) {
        this.sortNumGreater = sortNumGreater;
        setGreaterField(User.SORT_NUM, sortNumGreater);
        return getSubThis();
    }

    public Sub setSortNumLess(Integer sortNumLess) {
        this.sortNumLess = sortNumLess;
        setLessField(User.SORT_NUM, sortNumLess);
        return getSubThis();
    }

    public Sub setShowFlagIn(List showFlagIn) {
        this.showFlagIn = showFlagIn;
        setInField(User.SHOW_FLAG, showFlagIn);
        return getSubThis();
    }

    public Sub setDelFlagEq(Integer delFlagEq) {
        this.delFlagEq = delFlagEq;
        setEqualField(User.DEL_FLAG, delFlagEq);
        return getSubThis();
    }

    public Sub setNameLike(String nameLike) {
        this.nameLike = nameLike;
        setLikeField(User.NAME, nameLike);
        return getSubThis();
    }

    public Sub setPhoneLike(String phoneLike) {
        this.phoneLike = phoneLike;
        setLikeField(User.PHONE, phoneLike);
        return getSubThis();
    }

    public Sub setYkUserIdLike(String ykUserIdLike) {
        this.ykUserIdLike = ykUserIdLike;
        setLikeField(User.YK_USER_ID, ykUserIdLike);
        return getSubThis();
    }

    public Sub setIsValidIn(List isValidIn) {
        this.isValidIn = isValidIn;
        setInField(User.IS_VALID, isValidIn);
        return getSubThis();
    }

    public Sub setDeptIdLike(String deptIdLike) {
        this.deptIdLike = deptIdLike;
        setLikeField(User.DEPT_ID, deptIdLike);
        return getSubThis();
    }

    public Sub setImeiLike(String imeiLike) {
        this.imeiLike = imeiLike;
        setLikeField(User.IMEI, imeiLike);
        return getSubThis();
    }

    public Sub setYkDeptIdLike(String ykDeptIdLike) {
        this.ykDeptIdLike = ykDeptIdLike;
        setLikeField(User.YK_DEPT_ID, ykDeptIdLike);
        return getSubThis();
    }

    public Sub setYkIdLike(String ykIdLike) {
        this.ykIdLike = ykIdLike;
        setLikeField(User.YK_ID, ykIdLike);
        return getSubThis();
    }

    public Sub setIsBindIn(List isBindIn) {
        this.isValidIn = isBindIn;
        setInField(User.IS_BIND, isBindIn);
        return getSubThis();
    }
}